import MYRequest from "./request"

const request = new MYRequest({
  baseUrl: import.meta.env.VITE_APP_BASE_URL,
  timeout: 10000,
  interceptors: {
    // 拦截器成功响应
    requestInterceptor: (config) => {
      return config
    },
    // 拦截器失败响应
    requestInterceptorCatch(err) {
      return err
    },
    // 响应成功
    responseInterceptor: (res) => {
      return res
    },
    // 响应失败
    responseInterceptorCatch(err) {
      return err
    }
  }
})

export default request
